package com.jcark.ui.view.magicindicator

import android.content.Context
import android.graphics.Typeface

/**
 * 带颜色渐变和缩放的指示器标题
 * 博客: http://hackware.lucode.net
 */
class ScaleSizePagerTitleView(context: Context) : ScaleTransitionPagerTitleView(context) {
	//val mgr: AssetManager = context.getAssets()
	override fun onSelected(index: Int, totalCount: Int) {
		typeface =  Typeface.defaultFromStyle(Typeface.BOLD)
//		typeface =  Typeface.createFromAsset(mgr, "font/BlackAlternate.otf")
//		textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX,18f,context.resources.displayMetrics)
	}

	override fun onDeselected(index: Int, totalCount: Int) {
		typeface =  Typeface.defaultFromStyle(Typeface.NORMAL)
//		typeface =  Typeface.createFromAsset(mgr, "font/Regular.otf")
//		textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX,16f,context.resources.displayMetrics)
	}
}
